<%@ page language="java" pageEncoding="UTF-8"%>
<html>
<head>
<title>Test for jrpc simple</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" />
<script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all.js"></script>

<script type="text/javascript">var contextPath = "";</script>
<script type="text/javascript" charset="utf-8" src="shared/script/JsonRpcExt.js"></script>

<script type="text/javascript">
Ext.onReady(function() {
	Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
	Ext.QuickTips.init();
	//------------------------------------------------------
	// 一个汉字的宽度是12px，而对于form的field来讲，其label的y坐标要下移4px才好看一些
	var p = new Ext.form.FormPanel({
		layout: 'absolute',
		border: false,
		defaultType: 'textfield',
		reader : new Ext.data.JsonReader({ root: 'root', fields: ['RRR'] }),
		items: [
			{x: 0, y: 14, width: 30, xtype: 'label', text: '账号' },
			{x: 24, y: 10, width: 80, id: 'RRR', name: 'RRR' },
			
			{x: 150, y: 14, width: 50, xtype: 'label', text: '测试01' },
			{x: 200, y: 10, width: 120, id: 'pass', name: 'pass' },
			
			{x: 20, y: 40, width: 40, xtype: 'label', text: '密码' },
			{x: 60, y: 36, id: 'password', name: 'password', anchor: '95%' }
		 ]		
	});
	p.getForm().load({
		url: "/JRPC", 
		params:{
			__p: "{action:'MyTestRpc.form',params: ['helloasfasf', 123]}"
		},
		method: 'post'
	});
	//------------------------------------------------------
	var v = new Ext.Viewport({
		layout : 'fit',
		items : [ p ]
	});
});	
</script>
</head>

<body>
</body>
</html>